<template>
    <div class="tabpage">
        <div class="postion_reletive">
            <el-select @change="selectStreet" v-model="categoryId1" placeholder="请选择部件类别" :clearable="true">
                <el-option v-for="item in options1" :label="item.lable" :value="item.value">
                </el-option>
            </el-select>
        </div>
        <!-- <div class="postion_left">
            <span style="color: #8b93a1;">是否开启人员定位：</span>
            <el-switch v-model="SwitchValue" active-color="#13ce66" inactive-color="#969696" @change="onchange">
            </el-switch>
        </div> -->
        <div class="tabpage-page1 tabpage-box" v-if="pageActive == 1">
            <!-- 重复问题分析 -->
            <analysis />
            <!--发生趋势-->
            <Trend />
            <HeatMap></HeatMap>
        </div>

        <!-- <div class="tabpage-page2 tabpage-box" v-else>
            <ZhiHuiChengGuan />
            <ChengquKaoHe type="1" />
            <ChengquKaoHe type="2" />
        </div> -->

        <!-- <div class="tabpage-tab">
            <p @click="pageFn(1)">
                <img :src="pageActive == 1 ? page1Active : page1" alt="">
            </p>
            <p @click="pageFn(2)">
                <img :src="pageActive == 2 ? page2Active : page2" alt="">
            </p>
        </div> -->

    </div>
</template>

<script>
import HeatMap from './HeatMap.vue';
import ChengquKaoHe from './ChengquKaoHe.vue'
import ZhiHuiChengGuan from './ZhiHuiChengGuan.vue';
import analysis from '../Lawanalysis_right/analysis.vue'
import Trend from '../Lawanalysis_right/OccurringTrend.vue'
import Management from '../Lawanalysis_right/Management.vue'
import Assessment from '../Lawanalysis_right/Assessment.vue'
import department from '../Lawanalysis_right/department.vue'
import Bus from "@/untils/bus";

export default {
    components: {
        HeatMap,
        ChengquKaoHe,
        ZhiHuiChengGuan,
        analysis,
        Trend,
        Management,
        Assessment,
        department
    },
    data() {
        return {
            SwitchValue: false,
            page1: require("@/assets/images/zhangzi/home/page1.png"),
            page2: require("@/assets/images/zhangzi/home/page2.png"),
            page1Active: require("@/assets/images/zhangzi/home/page1-active.png"),
            page2Active: require("@/assets/images/zhangzi/home/page2-active.png"),
            pageActive: 1,
            options1: [
                {
                    lable: '实时案件',
                    value: 1
                },
                {
                    lable: '待处理案件',
                    value: 2
                },
                {
                    lable: '处理中案件',
                    value: 3
                },
                {
                    lable: '已超期案件',
                    value: 4
                },
            ],
            categoryId1: '',
        }
    },

    mounted() {
        this.selectStreet()
    },

    methods: {
        onchange() {
            this.selectStreet()
        },
        pageFn(value) {
            this.pageActive = value
        },

        selectStreet() {
            Bus.$emit('BujianType', this.categoryId1, this.SwitchValue)
        }
    }
}
</script>

<style lang="less" scoped>
.tabpage {
    width: 100%;
    // height: 100%;
    position: relative;

    .tabpage-box {
        height: calc(100% - 5.6rem);

        >div {
            width: 100%;
            padding: 2.1rem 1.6rem 1.6rem 2.1rem;
            background: url('../../../../assets/images/zhangzi/home/biankuang.png') no-repeat;
            background-size: 100% 100%;
        }
    }

    .tabpage-tab {
        width: 100%;
        position: absolute;
        bottom: -6rem;
        display: flex;
        align-items: center;
        justify-content: center;

        p {
            width: 108px;
            height: 39px;
            cursor: pointer;

            &:nth-child(2) {
                margin-left: 90px;
            }

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

}

.postion_reletive {
    width: 25rem;
    position: fixed;
    right: 53rem;
    top:  8.8rem;

    /deep/ .el-input__inner {
        padding-left: 2rem;
        width: 200px;
        height: 4.4rem;
        background: rgba(4, 11, 32, 0.7);
        border: 1px solid #16d0ff;
        box-shadow: 0px 0px 1.9rem 1px #173c90;
        border-radius: 8px;
        font-size:  1.8rem;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #ffffff;
        opacity: 0.7;
    }

    /deep/ .el-icon-arrow-up:before {
        content: '';
        background: url('../../../../assets/images/yingpanshidian/sanjiao.png') center center no-repeat;
        background-size: 1rem 8px;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 50%;
        left: 80%;
        transform: translate(-80%, -50%) rotate(180deg)
    }
}

.postion_left {
    width: 25rem;
    position: fixed;
    left: 560px;
    top:  8.8rem;
}
</style>